package basic_sample.client;

import java.rmi.Naming;

/**
 * Author: Al-assad 余林颖
 * E-mail: yulinying_1994@outlook.com
 * Date: 2018/2/2 17:15
 * Description: 远程调用对象客户端
 */
public class HelloClient {

    private static final long serialVersionUID =  4077329331699621321L;

    public static void main(String[] args){
        try {
             Hello hello = (Hello) Naming.lookup("rmi://127.0.0.1:1099/Hello");
             System.out.println(hello.say("Hello world"));

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
